class PageLocators {
  constructor(page) {
    this.page = page;
    this.tryItNowLink = 'a[href="https://saltcorn.com/tenant/create"]';
    this.subdomainInput = 'input[name="subdomain"]';
    this.submitButton = 'button[type="submit"]';
    this.successMessage = '#page-inner-content > section.page-section.pt-2 > div > div > div:nth-child(1)';
    // this.newApplicationLink = '#page-inner-content > section.page-section.pt-2 > div > div > div.my-3 > a';
    this.emailInput = 'input[type="email"]';
    this.passwordInput = 'input[type="password"]';
    this.textSource = 'div.wrap-builder-elem[title="Text"]';
    this.textlocator = '#saltcorn-builder > div.row > div.col-sm-auto.builder-sidebar > div > div.settings-panel.card.mt-1 > div.card-body.p-2 > div > div.border > div';
    this.inputbox1 = '#inputaddress';
    this.inputbox2 = '#inputdate_of_birth';
    this.saveprimarybutton = '#page-inner-content > div:nth-child(2) > div.d-inline > form > button';
    this.InputName = '#inputname';
    this.addFieldButtonLocator = 'a.btn.btn-primary.add-field.mt-2:has-text("Add field")';
    
        
    this.datelocator = 'span.flatpickr-day:has-text("14")';
    //'#page-top > div.flatpickr-calendar.hasTime.animate.open.arrowTop.arrowLeft > div.flatpickr-innerContainer > div > div.flatpickr-days > div > span:nth-child(3)';
    this.rowsperpage = '#input_rows_per_page';
    this.layoutoption = '#tab82036chead0';
    this.databaseoption = '#tab82036chead1';
    this.finishbutton = '#tab82036chead1 > button';
    this.target = 'div.canvas.root-canvas';
    this.destinationtype = '#inputdestination_type';
    this.destinationview = '#inputview_when_done';
    this.htmlCodeSource = 'div[title="HTML code"]';
    this.cardSource = 'div[title="Card"]';
    this.linkSource = 'div[title="Link"]';
    this.imageSource = 'div[title="Image"]';
    this.viewlinksource = 'div[title="Link to a view"]';
    this.newPageButton = 'a:has-text("Create page")';
    this.newPage_sidebar = 'span:has-text("Pages")';
    this.settingsTab = 'span:has-text("Settings")';
    this.settingdropdown='#collapseSettings > div';
    this.aboutApplicationLink = 'a.collapse-item:has-text("About application")';
    this.Modulesettingsidebar = '#collapseSettings > div > a:nth-child(2)';
    this.UsersAndSecurity = '#collapseSettings > div > a:nth-child(3)';
    this.SiteStructure = '#collapseSettings > div > a:nth-child(4)';
    this.File = '#collapseSettings > div > a:nth-child(5)';
    this.Events = '#collapseSettings > div > a:nth-child(6)';
    this.clearAllButton = 'a[href="/admin/clear-all"]';
    this.toasterSelector = '#toasts-area > div > div.toast-body.py-2.fs-6.fw-bold > strong';
    this.htmltextlocator = 'textarea.form-control';
    this.cardtextlocator = '//table//tr[1]//td//input';
    this.linklocator = '//table[1]//tr[1]//td[2]//input';
    this.linkurllocator = '//div[2]/div/table[1]//tr[3]//td[2]//input';
    this.expectedtoastermsg = 'Deleted all tables, views, pages, page_groups, files, triggers, eventlog, library, config, plugins';
    this.deletebutton = 'button.btn.btn-sm.btn-danger:has(svg[data-icon="trash-alt"])';
    this.clonebutton = 'button[title="Duplicate element with its children"]';
    this.CardUrl = '//table//tr[2]//td//input';
    this.click_table='a[href="/table"]';
    this.createtablebutton='a[href="/table/new"]';
    this.SaltCornButton='#accordionSidebar > a > div';
    this.createviewbutton='#accordionSidebar > li.nav-item.active > a';
    this.sidebarviewbutton='#accordionSidebar > li:nth-child(5) > a';
    this.createnewview = 'a[href="/viewedit/new"]';
    this.createtablefromCSV = 'a[href="/table/create-from-csv"]';
    this.homeCSVuplaod = 'a:has-text("CSV upload")';
    this.Defaultusertable = 'a[href="/table/1"]';
    this.Yourtabletab = 'a.nav-link.active:has-text("Your tables")';
    this.relationshipdiagram = 'a[href="/table/relationship-diagram"]';
    this.discoverbutton = 'a[href="/table/discover"]';
    this.HomeTableText='';
    this.Home_new_page_button = 'a:has-text("Create page")';
    this.siteidentitylocator = 'a.nav-link.active:has-text("Site identity")';
    this.backuplocator = 'a[href="/admin/backup"]';
    this.emaillocator = 'a[href="/admin/email"]';
    this.systemSettingsLink = 'a[href="/admin/system"]';
    this.mobileapplocator = 'a[href="/admin/build-mobile-app"]';
    this.developmentlocator = 'a[href="/admin/dev"]';
    this.notificationlocator = 'a[href="/admin/notifications"]';
    this.AllModuleslocator = 'a[href="/plugins?set=all"]';
    this.Moduleslocator = 'a[href="/plugins?set=modules"]';
    this.packslocator = 'a[href="/plugins?set=packs"]';
    this.themeslocator = 'a[href="/plugins?set=themes"]';
    this.Installedlocator = 'a[href="/plugins?set=installed"]';
    this.userslocator = '//a[contains(@class, "nav-link active") and contains(text(), "Users")]';
    this.roleslocator = 'a[href="/roleadmin"]';
    this.loginandsignup = 'a[href="/useradmin/settings"]';
    this.tableaccess = 'a[href="/useradmin/table-access"]';
    this.httplocator = 'a[href="/useradmin/http"]';
    this.permissionslocator = 'a[href="/useradmin/permissions"]';
    this.menulocator = 'a[href="/menu"]';
    this.searchtablocator = 'a[href="/search/config"]';
    this.librarylocator = 'a[href="/library/list"]';
    this.languagelocator = 'a[href="/site-structure/localizer"]';
    this.pagegroupslocator = 'a[href="/page_group/settings"]';
    this.tagslocator = 'a[href="/tag"]';
    this.diagramlocator = 'a[href="/diagram"]';
    this.registrylocator = 'a[href="/registry-editor"]';
    this.fileslocator = 'a.nav-link.active:has-text("Files")';
    this.storagelocator = 'a[href="/files/storage"]';
    this.Filesettinglocator = 'a[href="/files/settings"]';
    this.trigerslocator = 'a.nav-link.active:has-text("Triggers")';
    this.Customlocator = 'a[href="/eventlog/custom"]';
    this.logsettinglocator = 'a[href="/eventlog/settings"]';
    this.Eventloglocator = 'a[href="/eventlog"]';
    this.viewdiscriptiontext = '#inputdescription';
    this.viewtabledropdown = '#inputtable_name';
    this.viewminimumroledropdown = '#inputmin_role';
    this.choosefilebutton = '#inputfile';
    this.createviewfromtable = '#table-views > div > a';
    this.textstyle = '.form-control form-select';
    this.createuserlink = 'a[href="/useradmin/new"]';
    this.inputdob = '#inputdob';
    this.inputemail = '#inputemail';
    this.inputrole_id = '#inputrole_id';
    this.inputrnd_password = '#inputrnd_password';
    this.inputpassword = '#inputpassword';
    this.createuserbutton = 'button[type="submit"]:has-text("Create")';
    this.searchbar = 'input[type=search]';
    this.userdropdown = '#content > div.dropdown-menu.dropdown-menu-end.show';
    this.deleteuser = '#content > div.dropdown-menu.dropdown-menu-end.show > a:nth-child(11)';
    

    this.mytable = 'a:has-text("My_Table")';
    this.saveactionbutton = '//button[text()="Save"]';
    this.EditlinkLocator = 'a:has(i.fas.fa-2x.fa-edit)';
    this.downloadlinklocator = 'a:has(i.fas.fa-2x.fa-download)';
    this.uploadcsvlinklocator = 'label:has-text("Upload CSV")';
    this.addrowlocator = 'button.btn.btn-sm.btn-primary.me-2:has-text("Add row")';
    this.fieldsourrce = '//div[@title="Field"]';
    this.createfromcsvupload = '//a[@href="/table/create-from-csv"]';
    this.ActionLocator = 'div[title="Action button"]';
    this.lebelforfield = 'input[class*="viewlink-label"]';
    this.editviewlink = 'a.ms-2 i.fas.fa-edit';
    this.finishbuttonprimary = '//button[@type="submit" and contains(@class, "btn-primary") and text()="Finish »"]';
    this.nextoption = 'button:has-text("Next »")';
    this.finishprimary = '[role="button"][name="Finish »"]';
    this.calendarlocator = 'div.flatpickr-calendar.hasTime.animate.open.arrowTop.arrowLeft';
    this.yearlocator = 'input.numInput.cur-year';
    this.monthlocator = 'select.flatpickr-monthDropdown-months';
    this.addressvariablelocator = '(//code[text()="address"])[1]';
    this.DOBvariablelocator = '(//code[text()="date_of_birth"])[1]';
    this.fullnamevariablelocator = '(//code[text()="full_name"])[1]';
    this.fullnamefieldlocator = '//td[text()="Full name"]';
    this.dobfieldlocator = '//td[text()="Date of birth"]';
    this.addressfieldlocator = '//td[text()="Address"]';
    this.datetypelocator = '//td[text()="Date"]';
    this.Fullnameshow = 'div.d-inline:has-text("Full name")';
    this.fullnameuser = 'div.d-inline:has-text("First Name")';
    this.csvnamestringtype = '(//td[text()="String"])[2]';
    this.csvaddressstringtype = '(//td[text()="String"])[1]';
    this.deleteviewbutton = '(//a[text()="Delete"])[1]';
    this.editfieldlink = '(//a[text()="Edit"])[1]';
    this.showfieldlink = '(//a[text()="Show"])[1]';
    this.ActionLabel = 'input[type="text"].form-control';
    this.ActionHoverTitle = 'input.form-control:not([type])';
    this.containsdraglocator= 'div[title="Container"]';
    this.containerdisplaysetting = '//div[contains(text(), "Display")]';
    this.containercontentsetting = '//div[contains(text(), "Contents")]';
    this.containerflexsetting = '//div[contains(text(), "Flex properties")]';
    this.containercontentlink = '//div[contains(text(), "Container link")]';
    this.containercustomclass = '//div[contains(text(), "Custom class/CSS")]';
    this.SearchLocator= 'div[title="Search bar"]';  
    this.hasdropdowncheckbox = '//div[2]/div/div[1]/input[@type="checkbox"]';
    this.Autofocuscheckbox = '(//input[@class="form-check-input" and @name="block"])[3]';
    this.statebadgecheckbox = '(//input[@class="form-check-input" and @name="block"])[2]';
    this.saveButton = 'button.builder-save:has-text("Done »")';
    this.addcolumnbutton = 'button:has-text("Add column")';
    this.newcolumn1 = 'div:nth-child(4) > div:nth-child(2) > .canvas';
    this.newcolumn2 = 'div:nth-child(5) > div:nth-child(2) > .canvas';
    this.newcolumn3 = 'div:nth-child(6) > div:nth-child(2) > .canvas';
    this.newviewlink = 'a[href="/view/NewView_List"]';
    this.addpersonlink = 'a:has-text("Add person")';
    this.newviewfromtable = 'a[href="/view/csvView_list"]';
    this.Homecreateview = 'a:has-text("Create view")';
    this.viewpatterndropdown = '#inputviewtemplate';
    this.idfieldlocator = '//td[text()="ID"]';
    this.idtypelocator = '//td[text()="Integer"]';
    this.Stringtypelocator = '//td[text()="String"]';
    this.tab1locater = 'div.tabulator-cell[tabulator-field="full_name"]';
    this.tab2locator = 'div.tabulator-cell[tabulator-field="date_of_birth"]';
    this.tab3locator = 'div.tabulator-cell[tabulator-field="address"]';
    this.minlengthlocator = '//input[@id="inputmin_length"]';
    this.maxlengthlocator = '//input[@id="inputmax_length"]';
    this.viewtocreate = '#inputview_to_create';
    this.labeltocreate = '#inputcreate_view_label';
    this.fielddropdown = '(//select[@class="form-control form-select"])[1]'
    this.view2editoption = 'text=View2_Edit [Edit] My_Table';
    this.view2showoption = 'text=showView [Show] My_Table';
    this.viewtolinkdropdown = '//div[contains(@class, "css-1uccc91-singleValue")]';
    this.deletefieldbutton = '//i[@class="fas fa-trash-alt"]';
    this.errormessagelocator = '//input[@id="inputre_invalid_error"]';
    this.descriptionSelector = '//input[@id="inputdescription"]';
    this.RequiredcheckboxLocator = "//input[@id='inputrequired' and @type='checkbox']";
    this.labelTextboxlocator = '//input[@id="inputlabel"]';
    this.fullnamerequiredtaglocator = '(//span[@class="badge bg-primary" and text()="Required"])[1]';
    //'#page-inner-content > div:nth-child(2) > div.card.shadow.mt-0 > div > div > table > tbody > tr:nth-child(1) > td:nth-child(4) > span';
  } 
}

module.exports = PageLocators;
